import { Checkbox } from 'antd'

const CheckboxEntry = (props) => {
  const { title, defaultValue, value, onChange, ...opt } = props
  return (
    <Checkbox
      {...opt}
      defaultChecked={defaultValue}
      checked={value}
      onChange={(e) => onChange(e.target.checked)}
    >
      {title}
    </Checkbox>
  )
}

export default CheckboxEntry
